<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
</head>

<body>
    <div id="app">
        <!-- 直接使用不会解析标签 -->
        {{html}}
        <!-- v-html和innerHTML类似 -->
        <div v-html="html"></div>
    </div>
</body>
<script>
    new Vue({
        el: "#app",
        data: {
            // 解析标签h1
            html: "<h1>带有标签的数据模板</h1>"
        }
    })
</script>

</html>